def socket = "228.5.6.7"
def port = 1000
def hopCount = 0

try{
	
}catch(Exception e)
{
	println e
}

InetAddress group = InetAddress.getByName(socket)
s = new MulticastSocket(port)
s.setTimeToLive(hopCount)
s.joinGroup(group)


byte[] buf = new byte[1000]
DatagramPacket recv = new DatagramPacket(buf, buf.length)

s.receive(recv)
//def byteArray = new ByteArrayInputStream(buf)
//def bufReader = new BufferedReader(new CharArrayReader(buf))

println new String(buf)
// OK, I'm done talking - leave the group...
s.leaveGroup(group)